import request from '@/utils/request'
import { download } from '@/utils/request'

// 新增民族设置
export function addNation(data) {
  return request({
    url: '/businessCore/faBasicNation',
    method: 'post',
    data
  })
}

// 修改民族设置
export function updateNation(data) {
  return request({
    url: '/businessCore/faBasicNation',
    method: 'put',
    data
  })
}

// 删除民族设置
export function delNation(id) {
  return request({
    url: '/businessCore/faBasicNation/' + id,
    method: 'delete'
  })
}

// 导出民族设置
export function exportNation(params, fileName) {
  const url = '/businessCore/faBasicNation/export'
  download(
    url,
    params,
    fileName + `_${new Date().getTime()}.xlsx`
  )
}